<h2>评论&gt; 列表</h2>
<script type="text/javascript" src="/js/sms.js"></script>
<script type="text/javascript" src="/js/calendar/WdatePicker.js"></script>
<form action="<?= AdminController::_makeURL('comment','index','search') ?>" method="post">
<table class="list" cellpadding="0" cellspacing="0" with="100%">
<tr>
	<td>用户uid</td>
    <td><input type="text" name="uid" value="<?=_('uid')?>" /></td>
</tr>
<tr>
	<td>按时间搜索</td>
	<td><span>开始时间：</span>
<input id="start" name="start" class="Wdate" type="text" onFocus="var end=$dp.$('end');WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:function(){end.focus();},maxDate:'#F{$dp.$D(\'end\')}'})" value="<?=_('start')?>" style="width:150px"/>
<span>结束时间：</span>
<input type="text" id="end" name="end" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'start\')}'});" class="Wdate" style="width:150px" value="<?=_('end')?>"/></td>
</tr>
<tr nowrap="nowrap">
	<td colspan="2" align="center"><input type="submit" value="开始搜索"  /></td>
</tr>
</table>
</form>
<form action="/?_app=comment&_controller=index&_action=check_verify" method="POST" >
<table class="list" cellpadding="0" cellspacing="0" with="100%">
	<thead align="right">
    <td colspan="9"><a href="<?= AdminController::_makeURL('comment','index','index') ?>">全部</a>  | 
    <a href="<?= AdminController::_makeURL('comment','index','index',array('verify'=>0)) ?>"> 未审核</a> |  
    <a href="<?= AdminController::_makeURL('comment','index','index',array('verify'=>1)) ?>">已审核 </a> | 
    <a href="<?= AdminController::_makeURL('comment','index','index',array('isdelete'=>2,'verify'=>1)) ?>"> 已删除</a>
    </td>
    </thead>
	<thead align="center">
		<td nowrap>序号</td>
		<td nowrap>创建者id</td>
		<td nowrap>创建者</td>
		<td nowrap width="200" >评论内容</td>
		<td nowrap>创建时间</td>
		<td nowrap>数据状态</td>
		<td nowrap>状态</td>
		<td nowrap>操作</td>
	</thead>
	<?php $i=1;?>
	<?if($this->data):?>
	<? foreach($this->data as $row):?>
	<tr  ondblclick='$$(".sms_content").each(function(v){v.toggle();})' style="background:#fcf3d6" >
		<td><?php echo $i;?></td>
		<td>
			<?= $row['author_id'] ?>
		</td>
		<td nowrap onclick='$("sms_content_<?=$row['id']?>").toggle()' >				
				<?= $row['author_name'] ?>
		</td>
		<td width="200">			
			<?= $row['content']?>
		</td>
		
		<td nowrap>
			<?= date('Y-m-d H:i:s', $row['create_time']) ?>
		</td>

		<td>
			<?PHP
			switch($row['deleted']){
				case 1:
					echo '本人删除';break;
				case 2:
					echo '管理员删除';break;
				default:
					echo '正常';break;
			}
			?>
		</td>
		<td>
			<?PHP
			switch($row['verify']){
				case 0:
					echo '未审核';break;
				default:
					echo '已审核';break;
			}
			?>
		</td>
		<td nowrap>
		
			<?php if($row['isdelete']==2):?>
			<!-- <a href='###' sid="<?= $row['id']?>" class="delete-link">恢复</a> -->
			<a href="<?= AdminController::_makeURL('blog','index','recover_del',array('id'=>$row['id'])) ?>" >恢复</a>
			<?php else:?>
			<?php if($row['verify']!=1 ):?>
			<label for="<?=$row['id']?>_1">
			<input type="radio" id="<?=$row['id']?>_1" value="0" name="verify[<?=$row['id']?>]" checked="checked" />通过</lable>
			<?php endif;?>
			<label for="<?=$row['id']?>_0">
			<input type="radio" id="<?=$row['sms_id']?>_0" value="1" name="verify[<?=$row['id']?>]" />删除</lable>
			<?php endif;?>
		</td>
	</tr>
	<tr style="display:none" id="sms_content_<?=$row['id']?>" class="sms_content" >
		<td colspan="9" bgcolor="#FFFFEE" width="1000px">
		<?= $row['content']?>
		</td>
	</tr>
	<?php ++$i;?>
	<? endforeach;?>
	<?endif?>
</table>
<table class="list" cellpadding="0" cellspacing="0">
	<thead>
		<td nowrap>
		&nbsp;&nbsp;<input type="submit" id="verify"  value="审核"  /> &nbsp;&nbsp;
        </td>
        </form>
    	<td align="right" nowrap>
			<?=$this->pageinfo?>
        </td>
    </thead>
</table>
<script>
$$('.resume-link').each(function(item){
	item.observe('click', resume_sel);
});
hookDeleteConfirm.hook = function(src){ return $H({_app: 'sms', _controller: 'sms', _action: 'resume', id: src.getAttribute('sid')}).toQueryString();};
</script>